Repository navigation
Remove the unused restoring of the PPX context - #8859
Conversation
c23eb5e to
debb3cc
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8859 +/- ##
==========================================
+ Coverage 80.49% 80.51% +0.02%
==========================================
Files 447 447
Lines 61027 61060 +33
==========================================
+ Hits 49123 49162 +39
+ Misses 11904 11898 -6
🚀 New features to boost your workflow:
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-8859 |
Every caller drops the context without restoring it, so the cookie store was never filled. PPXs still receive an empty cookies field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZbCuRQ1Tn31bnKzLj5e72 Signed-off-by: Christoph Knittel <ck@cca.io>
debb3cc to
25266eb
Compare
The compiler sends every external PPX an
[@@@ocaml.ppx.context]attribute and drops it again from the PPX's output.Ast_mapper.drop_ppx_context_str/_sigcould also restore the context's data in the compiler (include dirs, load path, open modules,debugand cookies), but all four callers pass~restore:false. SoPpx_context.restorenever ran and the cookie store stayed empty: PPXs always gotcookies = [], and cookies they set were discarded.This removes the dead code:
Ppx_context.restore, the cookie store and the~restoreparameter ofCmd_ppx_apply.apply_rewritersandAst_mapper.drop_ppx_context_*. The context PPXs receive is unchanged; it still carries an emptycookiesfield, and its strings still go through the v0 mapper as plain semantic strings.Found while making compiler state per-request for in-process compilation (#8781), where the cookie store was one of the globals to isolate.
Tests
tests/ounit_tests/ounit_ast_mapper0_tests.mlpins the v0 context a PPX receives: its field names, and an emptycookieslist.🤖 Generated with Claude Code